
<script type="text/javascript">
{literal}
	$(document).ready(function() {
		$('#labServiceUpdate').bind('click', function() {
			updateLabServiceSec2();
		});

		$('#labServiceAdd').bind('click', function() {
			addLabServiceSec2();
        });
        
		$('#labGroupSelect').bind('change', function() {
			showMessage('statusMessage', '', 'success');
			resetLabServiceData();
			var id = $('#labGroupSelect :selected').val();	
			loadLabServicesOfSelectedGroup(id, null, '');
		});

		$('#labServiceSelect').bind('change', function() {
            showMessage('statusMessage', '', 'success');
            var id = $('#labServiceSelect :selected').val();  
            setSelectedLabServiceSec2(id);
        });

		if ($('#labServiceId').val() != '') {
            $('#labServiceUpdate').attr('disabled',false);
        } else {
            $('#labServiceUpdate').attr('disabled','disabled');
        }

		showMessage('statusMessage', '', 'success');
        var id = $('#labGroupSelect :selected').val();  
        if ($.trim(id) != '') {            
        	loadLabServicesOfSelectedGroup(id, null, '');
        }
		
		
	});
{/literal}
</script>

<div>&nbsp;<span id="statusMessage" style="font-style: italic; color: red;"></span></div>
<div style="float: left;">
<table class="inline" cellspacing="0" cellpadding="0" width="500px;">
    <tr>
        <td width="200px;" class="label">{translate}Group name{/translate}</td>
        <td width="300px;">
            <select id="labGroupSelect" style="width: 300px;">{html_options options=$labGroups selected=$selectedLabGroup}</select>
        </td>        
    </tr> 
    <tr>
        <td width="200px;" class="label">{translate}Service name{/translate}</td>
        <td width="300px;">
        <input id="labServiceName" type="text" style="width: 300px;" value=""/>
        <input id="labServiceId" type="hidden" value="" />
        </td>
                
    </tr> 
    <tr>
        <td class="label">{translate}LabAdmin_Price{/translate}</td>
        <td><input id="labServicePrice" type="text" style="width: 70px;" value=""/>
        </td>        
    </tr>  
    <tr>
        <td class="label">{translate}Lock{/translate}</td>
        <td ><input id="labServiceLocked" type="radio" name="serviceDisabled" value="1">{translate}Yes{/translate}
             <input id="labServiceUnLock" type="radio" name="serviceDisabled" value="0">{translate}No{/translate}
        </td>        
    </tr>
    <tr>
       <td style="text-align: right;" colspan="3">&nbsp;
       <input id="labServiceAdd" type="button" value="{translate}Add{/translate}"/>
       &nbsp;
       <input id="labServiceUpdate" type="button" value="{translate}Update{/translate}"/></td>
    </tr>   
</table>
</div>
<div style="float: none;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<select id="labServiceSelect" size="20" style="width: 300px;">{html_options options=$labServices}</select>
<br />
<span style='color: green'>{translate}Unavilable services are marked *{/translate}</span>
</div>

